﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

public partial class Controles_jDatePick : System.Web.UI.UserControl
{

    public string Text
    {
        get { return ctlDate.Text; }
        set { ctlDate.Text = value; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        string idClt = ctlDate.ClientID;

        StringBuilder sb = new StringBuilder();

        sb.Append(@"<script language='javascript'>
        $(document).ready(function() {
            //date picker
            $('#" + ctlDate.ClientID + "').datepicker($.extend({},$.datepicker.regional['es'],{");

        sb.Append(@"showOn: 'both', buttonImage: '../images/calendar.gif',   buttonImageOnly: true })    );    });");
        sb.Append(@"</script>");

        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "datePick" + ctlDate.ClientID, sb.ToString());

    }
}
